import json
import os
import time
import threading

import cv2
from ultralytics import YOLO
import datetime

# 加载YOLOv8n模型
model = YOLO('weights/visdrone+mydata100+crowdhuman200.pt')  # 替换为你的模型路径

# 打开输入视频
input_video_path = 'E:/EFY/001无人机数据/4.jpg'  # 替换为你的输入视频路径
output_video_path = 'E:/EFY/002无人机数据'  # 替换为你的输出视频路径



model.predict(input_video_path, save=True, name=output_video_path, show=True, conf=0.5)

